<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>templates语法</title>
</head>
<body>
{#单个取值#}
<h1>单个取值</h1>
{{ n1 }}
{#取数组#}
<h1>取数组</h1>
{{ n2 }}
{#取数组某个元素#}
<h1 取数组某个元素></h1>
{{ n2.0 }}
{{ n2.1 }}
{{ n2.2 }}
{#循环#}
<h1>循环取值</h1>
{% for intm in n2 %}
    {{ intm }}
{% endfor %}
{#字典#}
<h1>字典</h1>
{{ n3 }}
<br>
{{ n3.name }}
{{ n3.age }}
{{ n3.salary }}
<br>
{% for item in n3 %}
    {{ item }}
{% endfor %}
<br>
{% for k in n3.keys %}
    {{ k }}
{% endfor %}
<br>
{% for values in n3.values %}
    {{ values }}
{% endfor %}
<br>
{% for k,v in n3.items %}
    {{ k }}={{ v }}
{% endfor %}
{#数组套字典#}
<h1>数组套字典</h1>
{{ n4 }}
<br>
{% for item in n4 %}
    {{ item.name }}{{ item.salary }}
    <br>
{% endfor %}
{#条件语句#}
{% if n1 == "用户" %}
    <h4>哈哈哈</h4>
{% elif n1 == "" %}
    <h4>呼呼呼</h4>
{% else %}
    <h4>嘻嘻嘻</h4>
{% endif %}


</body>
</html>